import pandas as pd
import matplotlib.pyplot as plt

x = ['20240218', '20240318', '20240418', '20240518', '20240618', '20240718', '20240818', '20240918', '20241018',
     '20241118', '20241218', '20250118']
y = [164.9, 155.1, 153.9, 151.4, 149.2, 147.4, 147.05, 150.6, 148.6, 148.2, 147.8, 137.6]  # y轴得要数字

plt.figure(figsize=(20, 8), dpi=80)
plt.plot(x, y)  # 红色+点线格式
for a, b in zip(x, y):
    plt.text(a, b, str(b))
plt.title('2024xx18_weight_change')
# plt.xlabel('month')
# plt.ylabel('weight')
plt.tight_layout()
# plt.show()
plt.savefig("2024xx18_weight_change.png")
print("2024xx18_weight_change ok!")
